Skip to content

fix(genesis): reject zero block gas limit - #332

Open
huklaa wants to merge 3 commits into
circlefin:mainfrom
huklaa:fix-321-block-gas-limit
Open

fix(genesis): reject zero block gas limit#332
huklaa wants to merge 3 commits into
circlefin:mainfrom
huklaa:fix-321-block-gas-limit

Conversation

@huklaa

@huklaa huklaa commented Sep 3, 2026

Copy link
Copy Markdown

Fixes #321.

Aligns genesis ProtocolConfig validation with the runtime protocol config invariant by requiring blockGasLimit to be at least 1 instead of allowing zero.

Adds focused schema regression coverage verifying that:

  • blockGasLimit: 1n is accepted
  • blockGasLimit: 0n is rejected
  • values above uint64 are rejected

This keeps genesis configuration from accepting a value that the runtime mutative API would reject.

@kutluhaneth46

Copy link
Copy Markdown

Heads-up: this looks like a duplicate of #327 (same one-line blockGasLimit: schemaBigInt.min(1n) change for #321). #327 also adds unit coverage under a different test filename. Worth coordinating so maintainers only merge one — happy to close this in favor of #327 if that helps triage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Genesis ProtocolConfig should reject zero blockGasLimit

2 participants